<script setup>
  import {useCounterStore} from "@/store/counter.js";
  import {storeToRefs} from "pinia";
  const store = useCounterStore();
  const {name,count} = storeToRefs(store)
  function add(){
    store.increment()
  }
</script>
<template>
  <h1>{{name}}</h1>
  <h1>{{count}}</h1>
  <button @click="add">++</button>
</template>
<style scoped>

</style>